package com.estate.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.estate.system.domain.Listing;
import com.estate.system.domain.pojo.ClientRecommendationsVo;
import com.estate.system.domain.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 房源 数据层
 *
 * @author simon
 */
public interface DataListingsMapper extends BaseMapper<Listing> {
    Long querySevenDaysNewListing(@Param("beginTime") String beginTime, @Param("endTime") String endTime,@Param("emailList")List<String> emailList);

    List<Map<String, Object>> getListingCountByArea(@Param("beginTime") String beginTime, @Param("endTime") String endTime,@Param("emailList")List<String> emailList);

    List<Map<String, Object>> transactions(String format, String format1);
    Page<HomeSaleDataView> selectListingPage(IPage<HomeSaleDataView> page,@Param("bo") HomeSaleDataView bo);

    List<Map<String, Object>> generatePropertyTypeData(@Param("paramData") Map<String, Object> paramData, @Param("emailList") List<String> emailList);

    List<Map<String, Object>> generateTransactionTypeData(@Param("paramData") Map<String, Object> paramData, @Param("emailList") List<String> emailList);

    List<Map<String, Object>> generateHeatmapData(@Param("paramData") Map<String, Object> paramData, @Param("emailList") List<String> emailList);

    Page<ClientRecommendationsVo> clientRecommendationsPages(IPage<ClientRecommendationsVo> page, @Param("req") ClientRecommendationsVo clientRecommendationsVo);

    List<AgentPropertyDistributionResult> createPropertyType(@Param("paramData") Map<String, Object> paramData, @Param("emailList") List<String> emailList);

    List<Map<String, Object>> generatePriceRangeData(@Param("paramData") Map<String, Object> paramData, @Param("emailList") List<String> emailList);

    List<Listing> selectListingsAll();

    String getKeyFindings(@Param("updateDate") String updateDate,@Param("department") String department);

    String getMarketGrowthPotential(String updateDate);

    List<SuburbDetailVo> getSuburbDetail(@Param("paramData") Map<String, Object> paramData, @Param("emailList") List<String> emailList);

    Map<String, Object> getTotalAIEngineCall(@Param("paramData")Map<String, Object> paramData, @Param("startDate") String startDate, @Param("endDate") String endDate);

    Map<String, Object> getDataSourceStatus(@Param("paramData")Map<String, Object> paramData, @Param("todayDate") String todayDate);

    Map<String, Object> getDataProcessJobDetail(Map<String, Object> paramData);

}
